<%@ page import="java.lang.reflect.Array" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.gz.User" %><%--
<%@ page import="java.User" %><%--
  Created by IntelliJ IDEA.
  User: gz
  Date: 2025/02/16
  Time: 20:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
  ArrayList<User> userArrayList = new ArrayList<>();
  userArrayList.add(new User("gz",23,"basketball"));
  userArrayList.add(new User("xs",23,"football"));
  userArrayList.add(new User("xsd",22,"dd"));
%>
<table bgcolor="#7fffd4" align="center" border="1px" width="300px">
  <tr>
    <th>姓名</th>
    <th>年龄</th>
    <th>爱好</th>
  </tr>
  <tr>
    <td>gg</td>
    <td>24</td>
    <td>oo</td>
  </tr>
  <%
    for (int i = 0; i < userArrayList.size(); i++) {
      User user = userArrayList.get(i);
  %>
        <tr>
          <td><%=user.getName()%></td>
          <td><%=user.getAge()%></td>
          <td><%=user.getHobby()%></td>
        </tr>
      <%
    }
  %>
<%--  --%>
</table>
</body>
</html>
